Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@smithy/hash-node

Package Overview
Dependencies
Maintainers
0
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/hash-node

[![NPM version](https://img.shields.io/npm/v/@smithy/hash-node/latest.svg)](https://www.npmjs.com/package/@smithy/hash-node) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/hash-node.svg)](https://www.npmjs.com/package/@smithy/hash-node)

  • 3.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17M
increased by18.81%
Maintainers
0
Weekly downloads
 
Created

What is @smithy/hash-node?

@smithy/hash-node is an npm package designed to provide hashing utilities for Node.js applications. It is part of the Smithy framework, which is used for building SDKs and other tools. This package offers functionalities to create hash digests using various algorithms.

What are @smithy/hash-node's main functionalities?

Creating SHA-256 Hash

This feature allows you to create a SHA-256 hash of a given input string. The code sample demonstrates how to initialize a SHA-256 hash, update it with a string, and then get the hexadecimal digest of the hash.

const { Hash } = require('@smithy/hash-node');
const hash = new Hash('sha256');
hash.update('Hello, World!');
const digest = hash.digest('hex');
console.log(digest);

Creating MD5 Hash

This feature allows you to create an MD5 hash of a given input string. The code sample shows how to initialize an MD5 hash, update it with a string, and then get the hexadecimal digest of the hash.

const { Hash } = require('@smithy/hash-node');
const hash = new Hash('md5');
hash.update('Hello, World!');
const digest = hash.digest('hex');
console.log(digest);

Other packages similar to @smithy/hash-node

FAQs

Package last updated on 09 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc